<template lang="pug">
  table-selector(
    @sureHandle="sureHandle"
    :visible.sync="visibleDialog"
    :column="children.column"
    :search-config="children.searchConfig"
    label="教保师"
    :single="true"
    reqMethod="GET"
    :queryPropsParams="{ areaId: curArea.areaId, status: 0 }"
    req-url="/api/staff_extend/info/list_join"
  )
</template>

<script>
import { mapGetters } from 'vuex'
import TableSelector from '@/components/Basic/TableSelector'
import { columnConfig, seachConfig } from './config.js'
export default {
  name: 'ChildrenSelect',
  components: {
    TableSelector
  },
  props: {
    visible: {
      type: Boolean,
      default: false
    }
  },
  data () {
    return {
    }
  },
  computed: {
    ...mapGetters(['curArea']),
    visibleDialog: {
      get () {
        return this.visible
      },
      set (val) {
        this.$emit('update:visible', val)
      }
    },
    children () {
      return {
        column: columnConfig,
        searchConfig: seachConfig()
      }
    }
  },
  created () {
  },
  methods: {
    sureHandle (data) {
      this.$emit('sureHandle', data)
      this.$_handleCancel()
    },

    $_handleCancel () {
      this.visibleDialog = false
    }
  }
}
</script>

<style scoped>

</style>
